//
//  FCCustomerRelationRequest.h
//  customerRelation_Example
//
//  Created by 陈文斌 on 2019/2/17.
//  Copyright © 2019 64912907. All rights reserved.
//

#import "FCHttpTool.h"
#import "FCCompanyDepartmentModel.h"
#import "FCPermissSubCellModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface FCCustomerRelationRequest :FCHttpTool
/**
 * 获取关系类型
 */
+ (void)getCrmSupplyRelationTypeWithArgs:(NSDictionary *)args success:(successBlock)success failure:(errorBlock)failure;

/**
 * 获取关系列表
 */
+ (void)getRelationRequestsWithArgs:(NSDictionary *)args success:(successBlock)success failure:(errorBlock)failure;

/**
 * 添加上下游关系
 */
+ (void)addRelationRequestsWithArgs:(NSDictionary *)args success:(successBlock)success failure:(errorBlock)failure;
/**
 * 获取关系详情
 */
+ (void)getRelationDetailWithArgs:(NSDictionary *)args success:(successBlock)success failure:(errorBlock)failure;
/**
 * 编辑关系信息
 */
+ (void)editRelationWithArgs:(NSDictionary *)args success:(successBlock)success failure:(errorBlock)failure;
/**
 * 删除关系信息
 */
+ (void)deleteRelationRequestWithArgs:(NSDictionary *)args success:(successBlock)success failure:(errorBlock)failure;
/**
 * 处理关系
 */
+ (void)dealRelationRequestWithArgs:(NSDictionary *)args vc:(UIViewController *)vc success:(successBlock)success failure:(errorBlock)failure;
/**
 * 获取工作组员工
 */
+ (void)getWorkGroupEmployeeWithVariables:(NSDictionary *)variables success:(successBlock)success failure:(errorBlock)failure;
/**
 部门列表
 
 @param companyId 企业标识
 @param param 其他限制条件//可传空
 */
+ (void)getCompanyCompanydepartmentsWithCompanyId:(NSString*)companyId orOtherParam:(NSMutableDictionary *)param success:(void (^)(NSArray<FCCompanyDepartmentModel *>*result))success failure:(void (^)(NSError *error))failure;

/**
 自己的企业的职员列表(包含未审核的企业)
 */
+ (void)myEmployeesListWithParam:(NSMutableDictionary *)param success:(void (^)(NSMutableArray *result))success failure:(void (^)(NSError *error))failure;

/**
 * 根据全称和所有者电话获取企业
 */
+ (void)getCompanyInfoWithArgs:(NSDictionary *)args success:(successBlock)success failure:(errorBlock)failure;

/**
 * 添加或更新关系类型，更新需要传关系类型Id
 */
+ (void)addOrUpdateRelationTypeWithArgs:(NSDictionary *)args success:(successBlock)success failure:(errorBlock)failure;

/**
 * 删除关系类型
 */
+ (void)deleteRelationTypeWithArgs:(NSDictionary *)args vc:(UIViewController *)vc success:(successBlock)success failure:(errorBlock)failure;

/**
 * 关系类型排序
 */
+ (void)sortRelationTypeWithArgs:(NSDictionary *)args success:(successBlock)success failure:(errorBlock)failure;

/**
 * 检测当前职员是否仅是类型负责人
 */
+ (void)relationOnlyTypeManagerWithArgs:(NSDictionary *)args success:(successBlock)success failure:(errorBlock)failure;

/**
 * 权限验证
 */
+ (void)getPermissionWithManyCode:(NSArray *)code andReturnBlock:(void (^)(NSArray<FCPermissSubCellModel *> *))success;

@end

NS_ASSUME_NONNULL_END
